<!DOCTYPE html>
<html>
<head>
	<title>sha1</title>
	<script type="text/javascript" src="bower_components/js-sha1/build/sha1.min.js"></script>
</head>
<body>


<script type="text/javascript">
  var emailUrl = '';
            var emailObj = { '@163.com': 'http://mail.163.com/',
                             '@126.com': 'http://www.126.com/'
                            }
            var email = 'wxb@1326.com';
            var indexAt = email.indexOf('@');
			 var mailHost = email.substr(indexAt,email.length-indexAt);
            if(mailHost in emailObj)
            {
                console.log('email obj has this mail ');
            }
			else
			{
			 console.log('email obj has not  this mail ');
			}
			
            emailUrl = emailObj[email.substr(indexAt,email.length-indexAt)];
console.log(emailUrl);
</script>
</body>
</html>